﻿if not exists(select 1 from fn_listextendedproperty('MaxRevision', null, null, null, null, null, null))
begin

	EXEC sys.sp_addextendedproperty 
	@name = N'MaxRevision', 
	@value = -1;

	select -1
end
else
	select value from fn_listextendedproperty('MaxRevision', null, null, null, null, null, null)

